package com.company.lanqiao;

import java.util.Scanner;

public class BuyDrinks {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count = 0;
        int res = 0;
        for (int i = 1; i < n + 1; i++) {
            // 收集到的瓶盖
            count++;
            if (count == 3) {
                count = 0;
                n++;
            }
            res++;
        }
        System.out.println(res);
    }

}
